The big problem with mark - sweep is that every active that is , allocated object , whether reachable or not , is visited during the sweep phase
2.
Mark - sweep and mark - compact collectors , however , expend considerably more effort examining dead objects , because they must examine every object in the heap during the sweep phase
3.
But it has deficiencies - collection pauses can be long , and the entire heap is visited in the sweep phase , which can have very negative performance consequences on virtual memory systems where the heap may be paged